﻿using System.Runtime.Serialization;

namespace RockBus.DataContracts
{
    [DataContract(Namespace = StringConstants.RockBusNamespace)]
    public class DeliveryInfo
    {
        //public DeliveryInfo(SubscriptionDetail subscriptionDetail)
        //{
        //    this.SubscriptionDetail = subscriptionDetail;
        //    this.EndpointInfoCollection = new EndpointInfoCollection();
        //}

        public DeliveryInfo(SubscriptionDetail subscriptionDetail, EndpointInfo endpointInfo)
        //: this(subscriptionDetail)
        {
            this.SubscriptionDetail = subscriptionDetail;
            this.EndpointInfo = endpointInfo;
            //this.EndpointInfoCollection.Add(endpointInfo);
        }

        //public DeliveryInfo(SubscriptionDetail subscriptionDetail, IEnumerable<EndpointInfo> endpointInfos)
        //    : this(subscriptionDetail)
        //{
        //    foreach (EndpointInfo ei in endpointInfos)
        //    {
        //        this.EndpointInfoCollection.Add(ei);
        //    }
        //}

        /// <summary>
        /// The SubscriptionDetail object.
        /// </summary>
        [DataMember]
        public SubscriptionDetail SubscriptionDetail { get; set; }

        /// <summary>
        /// The EndpointInfo object.
        /// </summary>
        [DataMember]
        public EndpointInfo EndpointInfo { get; set; }
    }
}